package sctu.edu.java.year2016.team04.luoxinghua.day20160525.chapter7_1;

/**
 * Created by 落叶的思恋 on 2016/5/25.
 */

import java.util.Scanner;

public class Leitest {

   private String str;

    public Leitest(String str) {
        str = str;

    }

    public String getstr(String str) {
        System.out.print(" please you  the input String is :  ");
        Scanner scanf = new Scanner(System.in);
        str = scanf.nextLine();
        System.out.print("  you for the input String is :  ");
        System.out.println(str);
        return str;
    }

    public String deleteblank(String previous) {
        String s=previous;
        char[] s1=new char[previous.length()];
        for(int i=0,j=0;i<s.length();i++){
            if(s.charAt(i)!=' ') {
                s1[j] = s.charAt(i);
                j++;
            }
        }
        previous=new String(s1);
        System.out.println("去掉空格以后的单词为");
        return previous;
    }
}

